package com.xpffly.design.visitor;

import com.xpffly.design.visitor.service.Element;
import com.xpffly.design.visitor.service.ObjectStruture;
import com.xpffly.design.visitor.service.impl.Visitor;

/**
 * @Author: 午夜学徒
 * @Date: 2022/4/5 10:05
 * @Description：
 */
public class Scene {
    public static void main(String[] args) {
        for (int i = 0; i < 10; i++) {
            // 获取元素对象
            Element element = ObjectStruture.createElement();
            // 接受访问者访问
            element.accept(new Visitor());
        }
    }
}
